#include "mydialog.h"
#include "ui_mydialog.h"

MyDialog::MyDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::MyDialog)
{
    ui->setupUi(this);
    connect(ui->done,&QPushButton::clicked,this,[this](){
        this->done(11);   //设置退出码用来判断进行了什么操作
    });
}

MyDialog::~MyDialog()
{
    delete ui;
}


void MyDialog::on_accept_clicked()
{
    this->accept();
}


void MyDialog::on_reject_clicked()
{
    this->reject();
}


void MyDialog::on_done_clicked()
{
    this->done(10);
}

